package com.qijia.travel.domain.example;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.qijia.travel.common.Constants;
import com.qijia.travel.helper.DateHelper;
import com.qijia.travel.vo.TouristGroupVo;

public class TouristConsumptionExample extends BaseExample{
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public TouristConsumptionExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    protected TouristConsumptionExample(TouristConsumptionExample example) {
        this.orderByClause = example.orderByClause;
        this.oredCriteria = example.oredCriteria;
        this.distinct = example.distinct;
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }
    
    public Criteria createCriteria(TouristGroupVo vo) {
    	Criteria criteria = createCriteriaInternal(vo);
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
	}

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }
    
    protected Criteria createCriteriaInternal(TouristGroupVo vo) {
        Criteria criteria = new Criteria(vo);
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<String> criteriaWithoutValue;

        protected List<Map<String, Object>> criteriaWithSingleValue;

        protected List<Map<String, Object>> criteriaWithListValue;

        protected List<Map<String, Object>> criteriaWithBetweenValue;

        protected GeneratedCriteria() {
            super();
            criteriaWithoutValue = new ArrayList<String>();
            criteriaWithSingleValue = new ArrayList<Map<String, Object>>();
            criteriaWithListValue = new ArrayList<Map<String, Object>>();
            criteriaWithBetweenValue = new ArrayList<Map<String, Object>>();
        }

        public GeneratedCriteria(TouristGroupVo vo) {
			this();
			
			if(null!=vo){
					if (vo.getSearchCode() != null && vo.getSearchKeyword() != null
							&& vo.getSearchKeyword().length() > 0) {
						vo.setSearchKeyword(vo.getSearchKeyword().trim());
						switch (vo.getSearchCode()) {
						case Constants.SEARCH_GUIDE_ID_CODE: {
							try {
								this.andTgdGuideIdEqualTo(Integer.parseInt(vo.getSearchKeyword()));
							} catch (NumberFormatException e) {
							}
						}
							;
							break;
						case Constants.SEARCH_GUIDE_NAME_CODE: {
							this.andTgdGuideNameLike("%" + vo.getSearchKeyword() + "%");
						}
							;
							break;
						case Constants.SEARCH_GROUP_ID_CODE:
							this.andTgdTouristGroupSnLike(vo.getSearchKeyword() + "%");
							;
							break;
						default:
							break;
						}
					}
					
					if(null!=vo.getTouristGroupDetailId()){
						vo.setSearchCode(Constants.SEARCH_GROUP_ID_CODE);
						vo.setSearchKeyword(vo.getTouristGroupSn());
						this.andTcTgdIdEqualTo(vo.getTouristGroupDetailId());
					}

					if (vo.getDateCode() != null && (vo.getStDate() != null && vo.getStDate().length() > 0)) {
						Calendar startDate = Calendar.getInstance();
						Calendar endDate = null;

						try {
							startDate.setTime(DateHelper.parseToDate(vo.getStDate(), DateHelper.yyyyMMdd));
							if (vo.getEdDate() != null && vo.getEdDate().length() > 0) {
								endDate = Calendar.getInstance();
								endDate.setTime(DateHelper.parseToDate(vo.getEdDate(), DateHelper.yyyyMMdd));
							}

							switch (vo.getDateCode()) {
							case Constants.DATETYPE_GROUP_START_DATE_CODE: 
								if(null==endDate){
									this.andTgdStartDtGreaterThanOrEqualTo(startDate.getTime());
								}else{
									this.andTgdStartDtBetween(startDate.getTime(), endDate.getTime());
								}
							
								;
								break;
							case Constants.DATETYPE_GROUP_END_DATE_CODE: 
								if(null==endDate){
									this.andTgdEndDtGreaterThanOrEqualTo(startDate.getTime());
								}else{
									this.andTgdEndDtBetween(startDate.getTime(), endDate.getTime());
								}
							
								break;
							default:
								break;
							}
						} catch (Exception e) {
						}

					}
			}
		}

		public boolean isValid() {
            return criteriaWithoutValue.size() > 0
                || criteriaWithSingleValue.size() > 0
                || criteriaWithListValue.size() > 0
                || criteriaWithBetweenValue.size() > 0;
        }

        public List<String> getCriteriaWithoutValue() {
            return criteriaWithoutValue;
        }

        public List<Map<String, Object>> getCriteriaWithSingleValue() {
            return criteriaWithSingleValue;
        }

        public List<Map<String, Object>> getCriteriaWithListValue() {
            return criteriaWithListValue;
        }

        public List<Map<String, Object>> getCriteriaWithBetweenValue() {
            return criteriaWithBetweenValue;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteriaWithoutValue.add(condition);
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            Map<String, Object> map = new HashMap<String, Object>();
            map.put("condition", condition);
            map.put("value", value);
            criteriaWithSingleValue.add(map);
        }

        protected void addCriterion(String condition, List<? extends Object> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            Map<String, Object> map = new HashMap<String, Object>();
            map.put("condition", condition);
            map.put("values", values);
            criteriaWithListValue.add(map);
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            List<Object> list = new ArrayList<Object>();
            list.add(value1);
            list.add(value2);
            Map<String, Object> map = new HashMap<String, Object>();
            map.put("condition", condition);
            map.put("values", list);
            criteriaWithBetweenValue.add(map);
        }

        public Criteria andTcIdIsNull() {
            addCriterion("tc_id is null");
            return (Criteria) this;
        }

        public Criteria andTcIdIsNotNull() {
            addCriterion("tc_id is not null");
            return (Criteria) this;
        }

        public Criteria andTcIdEqualTo(Integer value) {
            addCriterion("tc_id =", value, "tcId");
            return (Criteria) this;
        }

        public Criteria andTcIdNotEqualTo(Integer value) {
            addCriterion("tc_id <>", value, "tcId");
            return (Criteria) this;
        }

        public Criteria andTcIdGreaterThan(Integer value) {
            addCriterion("tc_id >", value, "tcId");
            return (Criteria) this;
        }

        public Criteria andTcIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("tc_id >=", value, "tcId");
            return (Criteria) this;
        }

        public Criteria andTcIdLessThan(Integer value) {
            addCriterion("tc_id <", value, "tcId");
            return (Criteria) this;
        }

        public Criteria andTcIdLessThanOrEqualTo(Integer value) {
            addCriterion("tc_id <=", value, "tcId");
            return (Criteria) this;
        }

        public Criteria andTcIdIn(List<Integer> values) {
            addCriterion("tc_id in", values, "tcId");
            return (Criteria) this;
        }

        public Criteria andTcIdNotIn(List<Integer> values) {
            addCriterion("tc_id not in", values, "tcId");
            return (Criteria) this;
        }

        public Criteria andTcIdBetween(Integer value1, Integer value2) {
            addCriterion("tc_id between", value1, value2, "tcId");
            return (Criteria) this;
        }

        public Criteria andTcIdNotBetween(Integer value1, Integer value2) {
            addCriterion("tc_id not between", value1, value2, "tcId");
            return (Criteria) this;
        }

        public Criteria andTcTgdIdIsNull() {
            addCriterion("tc_tgd_id is null");
            return (Criteria) this;
        }

        public Criteria andTcTgdIdIsNotNull() {
            addCriterion("tc_tgd_id is not null");
            return (Criteria) this;
        }

        public Criteria andTcTgdIdEqualTo(Integer value) {
            addCriterion("tc_tgd_id =", value, "tcTgdId");
            return (Criteria) this;
        }

        public Criteria andTcTgdIdNotEqualTo(Integer value) {
            addCriterion("tc_tgd_id <>", value, "tcTgdId");
            return (Criteria) this;
        }

        public Criteria andTcTgdIdGreaterThan(Integer value) {
            addCriterion("tc_tgd_id >", value, "tcTgdId");
            return (Criteria) this;
        }

        public Criteria andTcTgdIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("tc_tgd_id >=", value, "tcTgdId");
            return (Criteria) this;
        }

        public Criteria andTcTgdIdLessThan(Integer value) {
            addCriterion("tc_tgd_id <", value, "tcTgdId");
            return (Criteria) this;
        }

        public Criteria andTcTgdIdLessThanOrEqualTo(Integer value) {
            addCriterion("tc_tgd_id <=", value, "tcTgdId");
            return (Criteria) this;
        }

        public Criteria andTcTgdIdIn(List<Integer> values) {
            addCriterion("tc_tgd_id in", values, "tcTgdId");
            return (Criteria) this;
        }

        public Criteria andTcTgdIdNotIn(List<Integer> values) {
            addCriterion("tc_tgd_id not in", values, "tcTgdId");
            return (Criteria) this;
        }

        public Criteria andTcTgdIdBetween(Integer value1, Integer value2) {
            addCriterion("tc_tgd_id between", value1, value2, "tcTgdId");
            return (Criteria) this;
        }

        public Criteria andTcTgdIdNotBetween(Integer value1, Integer value2) {
            addCriterion("tc_tgd_id not between", value1, value2, "tcTgdId");
            return (Criteria) this;
        }

        public Criteria andTcNameIsNull() {
            addCriterion("tc_name is null");
            return (Criteria) this;
        }

        public Criteria andTcNameIsNotNull() {
            addCriterion("tc_name is not null");
            return (Criteria) this;
        }

        public Criteria andTcNameEqualTo(String value) {
            addCriterion("tc_name =", value, "tcName");
            return (Criteria) this;
        }

        public Criteria andTcNameNotEqualTo(String value) {
            addCriterion("tc_name <>", value, "tcName");
            return (Criteria) this;
        }

        public Criteria andTcNameGreaterThan(String value) {
            addCriterion("tc_name >", value, "tcName");
            return (Criteria) this;
        }

        public Criteria andTcNameGreaterThanOrEqualTo(String value) {
            addCriterion("tc_name >=", value, "tcName");
            return (Criteria) this;
        }

        public Criteria andTcNameLessThan(String value) {
            addCriterion("tc_name <", value, "tcName");
            return (Criteria) this;
        }

        public Criteria andTcNameLessThanOrEqualTo(String value) {
            addCriterion("tc_name <=", value, "tcName");
            return (Criteria) this;
        }

        public Criteria andTcNameLike(String value) {
            addCriterion("tc_name like", value, "tcName");
            return (Criteria) this;
        }

        public Criteria andTcNameNotLike(String value) {
            addCriterion("tc_name not like", value, "tcName");
            return (Criteria) this;
        }

        public Criteria andTcNameIn(List<String> values) {
            addCriterion("tc_name in", values, "tcName");
            return (Criteria) this;
        }

        public Criteria andTcNameNotIn(List<String> values) {
            addCriterion("tc_name not in", values, "tcName");
            return (Criteria) this;
        }

        public Criteria andTcNameBetween(String value1, String value2) {
            addCriterion("tc_name between", value1, value2, "tcName");
            return (Criteria) this;
        }

        public Criteria andTcNameNotBetween(String value1, String value2) {
            addCriterion("tc_name not between", value1, value2, "tcName");
            return (Criteria) this;
        }

        public Criteria andTcAmountIsNull() {
            addCriterion("tc_amount is null");
            return (Criteria) this;
        }

        public Criteria andTcAmountIsNotNull() {
            addCriterion("tc_amount is not null");
            return (Criteria) this;
        }

        public Criteria andTcAmountEqualTo(Long value) {
            addCriterion("tc_amount =", value, "tcAmount");
            return (Criteria) this;
        }

        public Criteria andTcAmountNotEqualTo(Long value) {
            addCriterion("tc_amount <>", value, "tcAmount");
            return (Criteria) this;
        }

        public Criteria andTcAmountGreaterThan(Long value) {
            addCriterion("tc_amount >", value, "tcAmount");
            return (Criteria) this;
        }

        public Criteria andTcAmountGreaterThanOrEqualTo(Long value) {
            addCriterion("tc_amount >=", value, "tcAmount");
            return (Criteria) this;
        }

        public Criteria andTcAmountLessThan(Long value) {
            addCriterion("tc_amount <", value, "tcAmount");
            return (Criteria) this;
        }

        public Criteria andTcAmountLessThanOrEqualTo(Long value) {
            addCriterion("tc_amount <=", value, "tcAmount");
            return (Criteria) this;
        }

        public Criteria andTcAmountIn(List<Long> values) {
            addCriterion("tc_amount in", values, "tcAmount");
            return (Criteria) this;
        }

        public Criteria andTcAmountNotIn(List<Long> values) {
            addCriterion("tc_amount not in", values, "tcAmount");
            return (Criteria) this;
        }

        public Criteria andTcAmountBetween(Long value1, Long value2) {
            addCriterion("tc_amount between", value1, value2, "tcAmount");
            return (Criteria) this;
        }

        public Criteria andTcAmountNotBetween(Long value1, Long value2) {
            addCriterion("tc_amount not between", value1, value2, "tcAmount");
            return (Criteria) this;
        }

        public Criteria andTcDescIsNull() {
            addCriterion("tc_desc is null");
            return (Criteria) this;
        }

        public Criteria andTcDescIsNotNull() {
            addCriterion("tc_desc is not null");
            return (Criteria) this;
        }

        public Criteria andTcDescEqualTo(String value) {
            addCriterion("tc_desc =", value, "tcDesc");
            return (Criteria) this;
        }

        public Criteria andTcDescNotEqualTo(String value) {
            addCriterion("tc_desc <>", value, "tcDesc");
            return (Criteria) this;
        }

        public Criteria andTcDescGreaterThan(String value) {
            addCriterion("tc_desc >", value, "tcDesc");
            return (Criteria) this;
        }

        public Criteria andTcDescGreaterThanOrEqualTo(String value) {
            addCriterion("tc_desc >=", value, "tcDesc");
            return (Criteria) this;
        }

        public Criteria andTcDescLessThan(String value) {
            addCriterion("tc_desc <", value, "tcDesc");
            return (Criteria) this;
        }

        public Criteria andTcDescLessThanOrEqualTo(String value) {
            addCriterion("tc_desc <=", value, "tcDesc");
            return (Criteria) this;
        }

        public Criteria andTcDescLike(String value) {
            addCriterion("tc_desc like", value, "tcDesc");
            return (Criteria) this;
        }

        public Criteria andTcDescNotLike(String value) {
            addCriterion("tc_desc not like", value, "tcDesc");
            return (Criteria) this;
        }

        public Criteria andTcDescIn(List<String> values) {
            addCriterion("tc_desc in", values, "tcDesc");
            return (Criteria) this;
        }

        public Criteria andTcDescNotIn(List<String> values) {
            addCriterion("tc_desc not in", values, "tcDesc");
            return (Criteria) this;
        }

        public Criteria andTcDescBetween(String value1, String value2) {
            addCriterion("tc_desc between", value1, value2, "tcDesc");
            return (Criteria) this;
        }

        public Criteria andTcDescNotBetween(String value1, String value2) {
            addCriterion("tc_desc not between", value1, value2, "tcDesc");
            return (Criteria) this;
        }
        
        public Criteria andTgdTouristGroupSnIsNull() {
			addCriterion("tgd_tourist_group_sn is null");
			return (Criteria) (Criteria) this;
		}

		public Criteria andTgdTouristGroupSnIsNotNull() {
			addCriterion("tgd_tourist_group_sn is not null");
			return (Criteria) this;
		}

		public Criteria andTgdTouristGroupSnEqualTo(String value) {
			addCriterion("tgd_tourist_group_sn =", value, "tgdTouristGroupSn");
			return (Criteria) this;
		}

		public Criteria andTgdTouristGroupSnNotEqualTo(String value) {
			addCriterion("tgd_tourist_group_sn <>", value, "tgdTouristGroupSn");
			return (Criteria) this;
		}

		public Criteria andTgdTouristGroupSnGreaterThan(String value) {
			addCriterion("tgd_tourist_group_sn >", value, "tgdTouristGroupSn");
			return (Criteria) this;
		}

		public Criteria andTgdTouristGroupSnGreaterThanOrEqualTo(String value) {
			addCriterion("tgd_tourist_group_sn >=", value, "tgdTouristGroupSn");
			return (Criteria) this;
		}

		public Criteria andTgdTouristGroupSnLessThan(String value) {
			addCriterion("tgd_tourist_group_sn <", value, "tgdTouristGroupSn");
			return (Criteria) this;
		}

		public Criteria andTgdTouristGroupSnLessThanOrEqualTo(String value) {
			addCriterion("tgd_tourist_group_sn <=", value, "tgdTouristGroupSn");
			return (Criteria) this;
		}

		public Criteria andTgdTouristGroupSnLike(String value) {
			addCriterion("tgd_tourist_group_sn like", value,
					"tgdTouristGroupSn");
			return (Criteria) this;
		}

		public Criteria andTgdTouristGroupSnNotLike(String value) {
			addCriterion("tgd_tourist_group_sn not like", value,
					"tgdTouristGroupSn");
			return (Criteria) this;
		}

		public Criteria andTgdTouristGroupSnIn(List<String> values) {
			addCriterion("tgd_tourist_group_sn in", values, "tgdTouristGroupSn");
			return (Criteria) this;
		}

		public Criteria andTgdTouristGroupSnNotIn(List<String> values) {
			addCriterion("tgd_tourist_group_sn not in", values,
					"tgdTouristGroupSn");
			return (Criteria) this;
		}

		public Criteria andTgdTouristGroupSnBetween(String value1, String value2) {
			addCriterion("tgd_tourist_group_sn between", value1, value2,
					"tgdTouristGroupSn");
			return (Criteria) this;
		}

		public Criteria andTgdTouristGroupSnNotBetween(String value1,
				String value2) {
			addCriterion("tgd_tourist_group_sn not between", value1, value2,
					"tgdTouristGroupSn");
			return (Criteria) this;
		}

		public Criteria andTgdGuideIdIsNull() {
			addCriterion("tgd_guide_id is null");
			return (Criteria) this;
		}

		public Criteria andTgdGuideIdIsNotNull() {
			addCriterion("tgd_guide_id is not null");
			return (Criteria) this;
		}

		public Criteria andTgdGuideIdEqualTo(Integer value) {
			addCriterion("tgd_guide_id =", value, "tgdGuideId");
			return (Criteria) this;
		}

		public Criteria andTgdGuideIdNotEqualTo(Integer value) {
			addCriterion("tgd_guide_id <>", value, "tgdGuideId");
			return (Criteria) this;
		}

		public Criteria andTgdGuideIdGreaterThan(Integer value) {
			addCriterion("tgd_guide_id >", value, "tgdGuideId");
			return (Criteria) this;
		}

		public Criteria andTgdGuideIdGreaterThanOrEqualTo(Integer value) {
			addCriterion("tgd_guide_id >=", value, "tgdGuideId");
			return (Criteria) this;
		}

		public Criteria andTgdGuideIdLessThan(Integer value) {
			addCriterion("tgd_guide_id <", value, "tgdGuideId");
			return (Criteria) this;
		}

		public Criteria andTgdGuideIdLessThanOrEqualTo(Integer value) {
			addCriterion("tgd_guide_id <=", value, "tgdGuideId");
			return (Criteria) this;
		}

		public Criteria andTgdGuideIdIn(List<Integer> values) {
			addCriterion("tgd_guide_id in", values, "tgdGuideId");
			return (Criteria) this;
		}

		public Criteria andTgdGuideIdNotIn(List<Integer> values) {
			addCriterion("tgd_guide_id not in", values, "tgdGuideId");
			return (Criteria) this;
		}

		public Criteria andTgdGuideIdBetween(Integer value1, Integer value2) {
			addCriterion("tgd_guide_id between", value1, value2, "tgdGuideId");
			return (Criteria) this;
		}

		public Criteria andTgdGuideIdNotBetween(Integer value1, Integer value2) {
			addCriterion("tgd_guide_id not between", value1, value2,
					"tgdGuideId");
			return (Criteria) this;
		}

		public Criteria andTgdGuideNameIsNull() {
			addCriterion("tgd_guide_name is null");
			return (Criteria) this;
		}

		public Criteria andTgdGuideNameIsNotNull() {
			addCriterion("tgd_guide_name is not null");
			return (Criteria) this;
		}

		public Criteria andTgdGuideNameEqualTo(String value) {
			addCriterion("tgd_guide_name =", value, "tgdGuideName");
			return (Criteria) this;
		}

		public Criteria andTgdGuideNameNotEqualTo(String value) {
			addCriterion("tgd_guide_name <>", value, "tgdGuideName");
			return (Criteria) this;
		}

		public Criteria andTgdGuideNameGreaterThan(String value) {
			addCriterion("tgd_guide_name >", value, "tgdGuideName");
			return (Criteria) this;
		}

		public Criteria andTgdGuideNameGreaterThanOrEqualTo(String value) {
			addCriterion("tgd_guide_name >=", value, "tgdGuideName");
			return (Criteria) this;
		}

		public Criteria andTgdGuideNameLessThan(String value) {
			addCriterion("tgd_guide_name <", value, "tgdGuideName");
			return (Criteria) this;
		}

		public Criteria andTgdGuideNameLessThanOrEqualTo(String value) {
			addCriterion("tgd_guide_name <=", value, "tgdGuideName");
			return (Criteria) this;
		}

		public Criteria andTgdGuideNameLike(String value) {
			addCriterion("tgd_guide_name like", value, "tgdGuideName");
			return (Criteria) this;
		}

		public Criteria andTgdGuideNameNotLike(String value) {
			addCriterion("tgd_guide_name not like", value, "tgdGuideName");
			return (Criteria) this;
		}

		public Criteria andTgdGuideNameIn(List<String> values) {
			addCriterion("tgd_guide_name in", values, "tgdGuideName");
			return (Criteria) this;
		}

		public Criteria andTgdGuideNameNotIn(List<String> values) {
			addCriterion("tgd_guide_name not in", values, "tgdGuideName");
			return (Criteria) this;
		}

		public Criteria andTgdGuideNameBetween(String value1, String value2) {
			addCriterion("tgd_guide_name between", value1, value2,
					"tgdGuideName");
			return (Criteria) this;
		}

		public Criteria andTgdGuideNameNotBetween(String value1, String value2) {
			addCriterion("tgd_guide_name not between", value1, value2,
					"tgdGuideName");
			return (Criteria) this;
		}

		public Criteria andTgdStartDtIsNull() {
			addCriterion("tgd_start_dt is null");
			return (Criteria) this;
		}

		public Criteria andTgdStartDtIsNotNull() {
			addCriterion("tgd_start_dt is not null");
			return (Criteria) this;
		}

		public Criteria andTgdStartDtEqualTo(Date value) {
			addCriterion("tgd_start_dt =", value, "tgdStartDt");
			return (Criteria) this;
		}

		public Criteria andTgdStartDtNotEqualTo(Date value) {
			addCriterion("tgd_start_dt <>", value, "tgdStartDt");
			return (Criteria) this;
		}

		public Criteria andTgdStartDtGreaterThan(Date value) {
			addCriterion("tgd_start_dt >", value, "tgdStartDt");
			return (Criteria) this;
		}

		public Criteria andTgdStartDtGreaterThanOrEqualTo(Date value) {
			addCriterion("tgd_start_dt >=", value, "tgdStartDt");
			return (Criteria) this;
		}

		public Criteria andTgdStartDtLessThan(Date value) {
			addCriterion("tgd_start_dt <", value, "tgdStartDt");
			return (Criteria) this;
		}

		public Criteria andTgdStartDtLessThanOrEqualTo(Date value) {
			addCriterion("tgd_start_dt <=", value, "tgdStartDt");
			return (Criteria) this;
		}

		public Criteria andTgdStartDtIn(List<Date> values) {
			addCriterion("tgd_start_dt in", values, "tgdStartDt");
			return (Criteria) this;
		}

		public Criteria andTgdStartDtNotIn(List<Date> values) {
			addCriterion("tgd_start_dt not in", values, "tgdStartDt");
			return (Criteria) this;
		}

		public Criteria andTgdStartDtBetween(Date value1, Date value2) {
			addCriterion("tgd_start_dt between", value1, value2, "tgdStartDt");
			return (Criteria) this;
		}

		public Criteria andTgdStartDtNotBetween(Date value1, Date value2) {
			addCriterion("tgd_start_dt not between", value1, value2,
					"tgdStartDt");
			return (Criteria) this;
		}
		
		public Criteria andTgdEndDtIsNull() {
			addCriterion("tgd_end_dt is null");
			return (Criteria) (Criteria) this;
		}

		public Criteria andTgdEndDtIsNotNull() {
			addCriterion("tgd_end_dt is not null");
			return (Criteria) this;
		}

		public Criteria andTgdEndDtEqualTo(Date value) {
			addCriterion("tgd_end_dt =", value, "tgdEndDt");
			return (Criteria) this;
		}

		public Criteria andTgdEndDtNotEqualTo(Date value) {
			addCriterion("tgd_end_dt <>", value, "tgdEndDt");
			return (Criteria) this;
		}

		public Criteria andTgdEndDtGreaterThan(Date value) {
			addCriterion("tgd_end_dt >", value, "tgdEndDt");
			return (Criteria) this;
		}

		public Criteria andTgdEndDtGreaterThanOrEqualTo(Date value) {
			addCriterion("tgd_end_dt >=", value, "tgdEndDt");
			return (Criteria) this;
		}

		public Criteria andTgdEndDtLessThan(Date value) {
			addCriterion("tgd_end_dt <", value, "tgdEndDt");
			return (Criteria) this;
		}

		public Criteria andTgdEndDtLessThanOrEqualTo(Date value) {
			addCriterion("tgd_end_dt <=", value, "tgdEndDt");
			return (Criteria) this;
		}

		public Criteria andTgdEndDtIn(List<Date> values) {
			addCriterion("tgd_end_dt in", values, "tgdEndDt");
			return (Criteria) this;
		}

		public Criteria andTgdEndDtNotIn(List<Date> values) {
			addCriterion("tgd_end_dt not in", values, "tgdEndDt");
			return (Criteria) this;
		}

		public Criteria andTgdEndDtBetween(Date value1, Date value2) {
			addCriterion("tgd_end_dt between", value1, value2, "tgdEndDt");
			return (Criteria) this;
		}

		public Criteria andTgdEndDtNotBetween(Date value1, Date value2) {
			addCriterion("tgd_end_dt not between", value1, value2, "tgdEndDt");
			return (Criteria) this;
		}
    }

    /**
     * This class was generated by MyBatis Generator.
     * This class corresponds to the database table tourist_consumption
     *
     * @mbggenerated do_not_delete_during_merge Thu Nov 17 17:57:29 CST 2011
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }

		public Criteria(TouristGroupVo vo) {
			super(vo);
		}
    }
}